package com.example.jw_web.Servlet;

import com.example.jw_web.Mapper.MessageBoardDao;
import com.example.jw_web.pojo.MessageBoard;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Component
public class MessageBoardServlet {


    @Autowired
    MessageBoardDao messageBoardDao;

    public List<MessageBoard> getMessages() {

        return messageBoardDao.getMessages();

    }

    public void saveMessages(MessageBoard messageBoard) {

        messageBoardDao.saveMessages(messageBoard);

    }
}
